package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.ActivityBean;
import com.hlhj.funlike_business.moudle.PreferentialMoudle;
import com.hlhj.funlike_business.views.PreferentialView;

import java.util.List;

public class PreferentialPresenter extends BasePresenter<PreferentialMoudle,PreferentialView> implements PreferentialMoudle.getAddResult {
    @Override
    public void createModule() {
        module=new PreferentialMoudle();
        module.setListener(this);
    }

    public void LoadAddActivity(Context context,String condition,String activity_value){
        module.LoadAddActivity(context,condition,activity_value);
    }

    public void LoadDelActivity(Context context,int id){
        module.LoadDelActivity(context,id);
    }

    public void LoadActivityList(Context context){
        module.getActivityList(context);
    }
    @Override
    public void showResult(String msg) {
        getView().showResult(msg);
    }

    @Override
    public void showList(List<ActivityBean.DataBean> dataBeans) {
        getView().showList(dataBeans);
    }
}
